#region Header

// <file>
//     <copyright see="prj:///doc/copyright.txt"/>
//     <license see="prj:///doc/license.txt"/>
//     <owner name="none" email=""/>
//     <version>$Revision: 915 $</version>
// </file>

#endregion Header

namespace ICSharpCode.TextEditor.Util
{
    using System;
    using System.Drawing;

    class TipSpacer : TipSection
    {
        #region Fields

        SizeF spacerSize;

        #endregion Fields

        #region Constructors

        public TipSpacer(Graphics graphics, SizeF size)
            : base(graphics)
        {
            spacerSize = size;
        }

        #endregion Constructors

        #region Methods

        public override void Draw(PointF location)
        {
        }

        protected override void OnMaximumSizeChanged()
        {
            base.OnMaximumSizeChanged();

            SetRequiredSize(new SizeF
                            (Math.Min(MaximumSize.Width, spacerSize.Width),
                            Math.Min(MaximumSize.Height, spacerSize.Height)));
        }

        #endregion Methods
    }
}